﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="List.aspx.vb" Inherits="Assignment2.List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>List of Teachers</h1>
    <asp:Label ID="lblListOfTeachers" CssClass="textdetail" runat="server" Text="You can view users in more detail"></asp:Label>
<p>
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ID" 
        DataSourceID="SqlDataSourceList" ForeColor="#333333" GridLines="None"  >
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:ImageField DataImageUrlField="UserAvatarPicture" HeaderText="Avatar">
                <ControlStyle CssClass="avatarpicture" />
            </asp:ImageField>
            <asp:BoundField DataField="UserFirstName" HeaderText="Name" 
                SortExpression="UserFirstName" />
            <asp:BoundField DataField="UserLastName" HeaderText="Surname" 
                SortExpression="UserLastName" />
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="detail.aspx?ID={0}" HeaderText="Details" 
                Text="Click Here"></asp:HyperLinkField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceList" runat="server" 
        ConnectionString="<%$ ConnectionStrings:learningConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:learningConnectionString.ProviderName %>" 
        SelectCommand="SELECT * FROM [UserContent]"></asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="btnGetRss" runat="server" Text="Get Rss Of This Page" />
    </p>
<p>&nbsp;</p>
</asp:Content>
